/**   
* @Title: SystemInit.java 
* @Package com.bjgov.scoresys.init 
* @Description: TODO
* @author zhangyue
* @date 2011-8-10 下午11:50:14 
* @version V1.0   
*/
package com.bjgov.scoresys.init;

import java.util.Properties;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

import org.apache.velocity.app.Velocity;

/**
 * @author zhangyue
 *
 */
public class SystemInit extends HttpServlet{

	@Override
	public void init() throws ServletException {
		Properties p = new Properties();
		try {
			p.setProperty(Velocity.FILE_RESOURCE_LOADER_PATH,this.getServletContext().getRealPath(""));
			p.setProperty("input.encoding", "UTF-8");
			p.setProperty("directive.foreach.counter.name", "velocityCount");
			p.setProperty("directive.foreach.counter.initial.value", "1");
			Velocity.init(p);
		} catch (Exception e) {
			throw new ServletException(e);
		}
	}

	
	
}
